package com.xueyi.aixihu.reqeust;

import cn.hutool.core.date.DateUtil;
import com.xueyi.aixihu.reqeust.base.PageLimitReq;
import lombok.Data;
import org.springframework.util.StringUtils;

import java.util.Date;

/**
 * 描述 财务数据中心Req
 *
 * @auther 俞烨
 * @date 2022-08-30 09
 */
@Data
public class FinanceReportReq extends PageLimitReq {

    private String monthData;
    private Integer type;
    private Integer addressId;
    private String year;

    public void format() {

        this.monthData = StringUtils.isEmpty(monthData) ? null : monthData;
        this.year = StringUtils.isEmpty(year) ? DateUtil.format(new Date(), "yyyy") : year;
        countStartIndex();
    }
}
